package com.jingnan.data.service;

import com.jingnan.data.mapper.OrderItemMapper;
import com.jingnan.data.mapper.OrderMapper;
import com.jingnan.data.pojo.Order;
import com.jingnan.data.pojo.OrderItem;
import com.jingnan.data.pojo.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


/**
 * @Author: sublun
 * 将本地数据库中的用户信息导入到分片数据库中
 */
@Service
public class DataService {

    @Autowired
    private OrderMapper orderMapper;
    @Autowired
    private OrderItemMapper orderItemMapper;

    public Result insertOrder(Order order) {
        orderMapper.insert(order);
        return Result.builder().build();
    }

    public Result insertOrderItem(OrderItem orderItem) {
        orderItemMapper.insert(orderItem);
        return Result.builder().build();
    }



}